package com.gsn.poker.play;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.gsn.engine.myplay.GsnLayer;
import com.gsn.poker.asset.PokerTexture;

public class ThuPlayerGroup {
	float x, y, width, height;
	Group layer;
	public ThuPlayerGroup(Group layer, float x, float y) {
		this.x = x;
		this.y = y;
		this.layer = layer;
		Image bg = new Image(PokerTexture.inst().bgAvatar);
		bg.x = this.x;
		bg.y = this.y;
		
		layer.addActor(bg);
		
		AvatarUser ava = new AvatarUser(0);
		ava.x = this.x;
		ava.y = this.y;
		
		layer.addActor(ava);
		
		CardImg[] card = new CardImg[5];
		for (int i = 0; i < 5; i++){
			card[i] = new CardImg(52);
			card[i].x = this.x + 40 + card[i].width * 0.5f * i;
			card[i].y = this.y;
			layer.addActor(card[i]);
		}
		
		Image iconHost = new Image(PokerTexture.inst().iconHost);
		iconHost.x = x;
		iconHost.y = y + bg.height;
		
		Label name = new Label("trungkkk", new Label.LabelStyle(PokerTexture.inst().fontMedium, new Color(1, 1, 1, 1)));
		name.x = iconHost.x + 10;
		name.y = iconHost.y;
		
		Label gold = new Label("$ 111222343", new Label.LabelStyle(PokerTexture.inst().fontMedium, new Color(1, 1, 1, 1)));
		gold.x = iconHost.x + 10;
		gold.y = y;
		
		layer.addActor(iconHost);
		layer.addActor(name);
		layer.addActor(gold);
		
		Image upbo = new Image(PokerTexture.inst().chuUpBo);
		upbo.x = this.x + 40;
		upbo.y = this.y + 10;
		layer.addActor(upbo);
		
	}	
}	
